import QtQuick 2.15
import QtQuick.Controls 2.15
import com.example.buttonmanager 1.0

ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: "Button Example"

    Button {
        id: button1_page1
        text: "Button "
        anchors.centerIn: parent
        onClicked: {
            ButtonManager.instance().handleButtonClick(1)
        }
    }
    Button {
        id: button2_page1
        text: "Button 2"
        anchors.top: button1_page1.bottom
        anchors.topMargin: 100
        onClicked: {
            ButtonManager.instance().handleButtonClick(2)
        }
    }
    // 更多按钮...
}
